package ttc.sftp.data;

import java.util.List;
import java.util.Vector;

import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.SftpException;

import android.os.Environment;
import ttc.sftp.data.*;

public class RemoteFile {

	private Vector<SFile> vectorFiles;
	private SFile sFile;
	private String path;

	public RemoteFile(String path, ChannelSftp channel) {
		if (path.compareTo("") == 0 || path.compareTo("/") == 0) {
			try {
				
				this.path = channel.getHome();
			} catch (SftpException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		} else {
			this.path = path;
		}
		try {
			sFile = new SFile(this.path, channel);
			vectorFiles = sFile.getVectorFile();
		} catch (SftpException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public SFile getFile() {
		return sFile;
	}

	public Vector<SFile> getVectorFile() {
		return vectorFiles;
	}
}
